package del2.b;

import java.util.ArrayList;

public class InstructorRole implements Role {
	private ArrayList<String> ar;

	public InstructorRole(String course){
		ar = new ArrayList<String>();
		addCourse(course);
	}
	
	public void addCourse(String course){
		ar.add("" + course);
	}
	
	public ArrayList<String> getList(){
		return ar;
	}
	
	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("Instructor {");
		for(String course : ar){
			sb.append(course + ", ");
		}
		sb.delete(sb.length() - 2, sb.length());
		sb.append("}");
		return sb.toString();
	}
}
